1. Field of Invention
The present invention relates to reducing runtime memory requirements of a virtual machine running a dynamically-linked language. More specifically, the invention relates to a global constant pool that allows for the deletion of load-unit specific constant pool entries.
2. Description of Related Art
The execution or running of a computer program causes certain areas of memory to be allocated for use by the program. For example, whenever an object is created, a certain area of memory having a certain address is set aside for that object. It is difficult to predict how much memory an application program will require (conditions can vary each time the application is run). Thus, computing environments are designed with tools to manage the changing memory requirements of application programs.
In general, memory management involves two related tasks: allocation and recycling. As noted, allocation occurs when the program requests a block of memory. When a request is made, the memory manager must allocate that block of memory out of the larger block of memory it has received from the operating system. The tool that performs this task is known as the “allocator.” Recycling involves reusing memory blocks that contain data that is no longer required by the program. The tool that performs this task is often referred to as a “garbage collector.”
Java and other programming languages can be implemented in a computing environment that includes a virtual machine. A virtual machine is software that acts like a hardware processor and that runs on top of a host computer's operating system. In a Java environment, the virtual machine includes an interpreter. An interpreter translates and runs a program at the same time. Specifically, the interpreter translates one line of programming, executes that line of code, and then proceeds to the next line of code. Generally, an interpreter translates programming code that has been compiled from source code. For example, before Java source code is interpreted, the source code is translated or compiled into byte code by a compiler. The interpreter converts the byte code to machine language at run time.
Programs that require virtual machines, including programs written in Java and other dynamically-linked languages, are useful in a variety of areas. These programs are often written with the assumption that they will be run on devices with powerful processors and large amounts of memory. However, there is an ever-increasing demand by consumers for electronic gadgetry that is small in size, high in performance, and reasonably priced. However, the small size and power considerations for these devices typically result in small memory footprints. Examples of highly popular devices with small memory footprints include mobile telephones and personal digital assistants. In many cases, the size of the memory available on these devices limits the size and type of applications that can be run on them. In other cases, abbreviated or limited-functionality versions of application programs are developed and installed on small memory footprint devices. Neither situation is acceptable.